package com.study.constructor;

/**
 * 目标：认识构造器，明白两种类型的构造器的作用。
 */
public class Test {
    public static void main(String[] args) {
        Car car = new Car();
        System.out.println(car.name);
        System.out.println(car.price);
        car.name = "宝马";
        car.price = 38.9;
        System.out.println(car.name);
        System.out.println(car.price);
        Car car2 = new Car("大众",10.8);
        System.out.println(car2.name);
        System.out.println(car2.price);
    }
}
